﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Custom.Master" CodeBehind="OrderPlanCart.aspx.cs"
    Inherits="Things.Web.OrderPlan.OrderPlanCart" %>

<%@ Register Src="../Components/BuyerAddress.ascx" TagName="BuyerAddress" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script language="javascript" type="text/javascript">

    var flag = 0;
    function fnImageClick(obj) {
        if (flag == 0) {
            flag = 1;
            $('#divFaPiao').show();
            $(obj).find('img').attr("src", "../Style/images/arraw-2.jpg");
        }
        else {
            flag = 0;
            $('#divFaPiao').hide();
            $(obj).find('img').attr("src", "../Style/images/arraw1.jpg");
        }
    }
</script>

    <table width="973" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td align="center">
                <img src="../style/images/yj1.jpg" width="972" height="15" />
            </td>
        </tr>
    </table>
    <table width="972" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td height="10" align="center" valign="top" bgcolor="#FFFFFF">
                <table width="972" height="35" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="19">
                            &nbsp;
                        </td>
                        <td width="826" align="left" class="tdl">
                            收货地址
                        </td>
                        <td width="127">
                        </td>
                    </tr>
                </table>
                <table width="970" height="150" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="20" height="107">
                            &nbsp;
                        </td>
                        <td width="952" align="left">
                            <label for="textarea">
                            </label>
                            <uc1:BuyerAddress ID="BuyerAddress1" runat="server" />
                        </td>
                    </tr>
                </table>
                <table width="971" height="43" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="19">
                            &nbsp;
                        </td>
                        <td width="826" align="left" class="tdl">
                            <a id="aFaPiao" onclick="fnImageClick(this)" style="cursor: pointer">发票信息 &nbsp;<img
                                id="imgFaPiao" alt="" src="../Style/images/arraw1.jpg" />
                            </a>
                        </td>
                        <td width="127">
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <div id="divFaPiao" style="display: none;">
                    <table width="970" height="37" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                发票类型：
                            </td>
                            <td align="left">
                                <asp:RadioButtonList ID="rblFaPiaoLeiXing" runat="server" RepeatDirection="Horizontal">
                                    <asp:ListItem Selected="True">普通发票</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                发票抬头：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtFaPiaoTaiTou" runat="server" MaxLength="100" Width="400px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                发票内容：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtFaPiaoNeiRong" runat="server" MaxLength="100" Width="400px"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
    <table width="973" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
            <td align="center" style="background: white">
                <div style="width: 973px; background: white; text-align: center;">
                    <table width="972" height="31" border="0" cellpadding="0" cellspacing="0" class="tab15"
                        align="center" style="background: white;">
                        <tr>
                            <td width="5">
                            </td>
                            <td align="left" class="tdl">
                                订购计划
                            </td>
                        </tr>
                    </table>
                    <asp:Repeater ID="_ctlCart" runat="server" DataMember="SetId" OnItemCommand="_ctlCart_ItemCommand">
                        <HeaderTemplate>
                            <table width="972" border="0" cellpadding="0" cellspacing="0" class="tab25" align="center">
                                <tr>
                                    <td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
                                        &nbsp;
                                    </td>
                                    <td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
                                        套餐
                                    </td>
                                    <td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
                                        商品
                                    </td>
                                    <td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
                                        配送
                                    </td>
                                    <td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
                                        周期
                                    </td>
                                    <td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
                                        单价
                                    </td>
                                    <td height="34" align="center" valign="middle" bgcolor="#F7F7F7">
                                        总价
                                    </td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr style="height: 49px;">
                                <td>
                                    <img src='<%# GetGoodsImageUrl((string)Eval("GoodsId")) %>' width="32px" height="32px"
                                        style="vertical-align: middle; text-align: center" />
                                </td>
                                <td>
                                    <%# GetSetName((string)Eval("SetId")) %>
                                </td>
                                <td>
                                    <%# GetGoodsName((string)Eval("GoodsId"))%>
                                </td>
                                <td>
                                    一次配送<%# Eval("deliveredNumber")%>件
                                </td>
                                <td>
                                    每<%# Eval("deliveredCycle")%>个月送一次(送<%# Eval("deliveredCount")%>次)
                                </td>
                                <td>
                                    <%# GetUnitPrice((string)Eval("SetId"), (string)Eval("GoodsId"))%>元/件
                                </td>
                                <td>
                                    <%# GetTotalPrice((string)Eval("SetId"), (string)Eval("GoodsId"))%>元
                                </td>
                                <asp:LinkButton ID="LinkButton1" runat="server" Visible="false" CommandName="delete"
                                    OnClientClick="return confirm('你确认要删除吗?')">删除</asp:LinkButton>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                    
            </td>
        </tr>
    </table>
    <asp:Panel ID="Panel1" runat="server" HorizontalAlign="Center" Visible="false" Width="915px">
        您的购物车中暂无商品，赶紧<a id="A1" href="~/default.aspx" runat="server">选择心爱的商品</a>吧！
    </asp:Panel>
    <table width="915px" height="37" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                &nbsp;
            </td>
            <td width="100" align="center">
                商品价格：
            </td>
            <td width="100" align="left" class="td8">
                <asp:Label ID="lblCount" runat="server" Text=""></asp:Label>元
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td width="100" align="center">
                运&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 费：
            </td>
            <td width="100" align="left" class="td8">
                <asp:Label ID="lblYunFei" runat="server" Text=""></asp:Label>元
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td width="100" align="center">
                订单金额：
            </td>
            <td width="100" align="left" class="td8">
                <asp:Label ID="lblDingDanJinE" runat="server" Text=""></asp:Label>元
            </td>
        </tr>
    </table>
    <table width="970" height="49" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td width="784" align="left">
                <asp:LinkButton ID="LinkButton4" runat="server" PostBackUrl="~/OrderPlan/Default.aspx">
                    <img id="Img1" src="~/Style/images/jche.jpg" width="80" height="36" border="0" runat="server" /></asp:LinkButton>
            </td>
            <td align="center">
                <asp:ImageButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" ImageUrl="~/Style/images/tjdd.jpg">
                </asp:ImageButton>
            </td>
        </tr>
    </table>
    </asp:Content>
